package com.flycent.hqhs.bean;



/**
 * @author fbl
 *  购物车项
 */
public class CartItem {

	/** 购物项 id*/
	private long id;
	/** 是否被勾选 */
	private boolean chosen;
	/** 商品数量 */
	private int quantity; 
	/** 应付金额 */
	private float itemPayPrice; 
	/** 原价 */
	private float itemOldPrice; 
	/** 商品总重量，单位：克 */
	private int itemWeight; 
	/** 套餐 */
	private CartItemBundle cartItemBundle;
	/** 单个商品  */
	private Product item;
	/** 是否在有效期中 */
	private  boolean isValid;
	public long getId() {
		return id;
	}
	public void setId(long id) {
		this.id = id;
	}
	public boolean isChosen() {
		return chosen;
	}
	public void setChosen(boolean chosen) {
		this.chosen = chosen;
	}
	public int getQuantity() {
		return quantity;
	}
	public void setQuantity(int quantity) {
		this.quantity = quantity;
	}
	public float getItemPayPrice() {
		return itemPayPrice;
	}
	public void setItemPayPrice(float itemPayPrice) {
		this.itemPayPrice = itemPayPrice;
	}
	public float getItemOldPrice() {
		return itemOldPrice;
	}
	public void setItemOldPrice(float itemOldPrice) {
		this.itemOldPrice = itemOldPrice;
	}
	public int getItemWeight() {
		return itemWeight;
	}
	public void setItemWeight(int itemWeight) {
		this.itemWeight = itemWeight;
	}
	public CartItemBundle getCartItemBundle() {
		return cartItemBundle;
	}
	public void setCartItemBundle(CartItemBundle cartItemBundle) {
		this.cartItemBundle = cartItemBundle;
	}
	public Product getItem() {
		return item;
	}
	public void setItem(Product item) {
		this.item = item;
	}
	public boolean isValid() {
		return isValid;
	}
	public void setValid(boolean isValid) {
		this.isValid = isValid;
	}
	public CartItem(long id, boolean chosen, int quantity, float itemPayPrice,
			float itemOldPrice, int itemWeight, CartItemBundle cartItemBundle,
			Product item, boolean isValid) {
		super();
		this.id = id;
		this.chosen = chosen;
		this.quantity = quantity;
		this.itemPayPrice = itemPayPrice;
		this.itemOldPrice = itemOldPrice;
		this.itemWeight = itemWeight;
		this.cartItemBundle = cartItemBundle;
		this.item = item;
		this.isValid = isValid;
	}
	public CartItem() {
		super();
	}
	@Override
	public String toString() {
		return "CartItem [id=" + id + ", chosen=" + chosen + ", quantity="
				+ quantity + ", itemPayPrice=" + itemPayPrice
				+ ", itemOldPrice=" + itemOldPrice + ", itemWeight="
				+ itemWeight + ", cartItemBundle=" + cartItemBundle + ", item="
				+ item + ", isValid=" + isValid + "]";
	}



}
